home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 985 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.7 KB

  1. Path: fido.asd.sgi.com!austern
  2. From: David Byrden <Goyra@iol.ie>
  3. Newsgroups: comp.std.c++
  4. Subject: Re: Must exception classes have copy constructors?
  5. Date: 06 Apr 1996 11:33:33 PST
  6. Organization: Ireland On-Line
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <4k36ab$n6s@nuacht.iol.ie>
  9. References: <606373375wnr@ma.ccngroup.com>
  10. NNTP-Posting-Host: isolde.mti.sgi.com
  11. X-Original-Date: 5 Apr 1996 13:13:47 GMT
  12. X-Mailer: Mozilla 1.22KIT (Windows; I; 16bit)
  13. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  14.     iQBVAwUBMWbHDky4NqrwXLNJAQF73gH/Q9rFuZAwZUKhcGOIR16t/GZHTlcmEWMK
  15.     FFYti53ZDVl5SobojDEIVRa/aaHFgJXRIC+3QagiMyLAzMuN0P4spA==
  16.     =liJk
  17. Originator: austern@isolde.mti.sgi.com
  18.  
  19. Alan Griffiths <aGriffiths@ma.ccngroup.com> wrote:
  20.  
  21. >I've just tried porting some code to MSVC4 (it compiles and works with 
  22. >SC7.1 and BC4.5).
  23. >
  24. >In effect it appears that the Microsoft compiler _requires_ anything 
  25. >thrown as an exception to have an accessible copy constructor.  (I've 
  26. >tended to make copy constructors private to ensure catch-by-reference
  27. >and aviod slicing bugs.)
  28. >
  29. >Looking through the DWP I can't see any reason to require a copy 
  30. >constructor, but there are references to copying temporaries.
  31.  
  32.           What DWP did you read? The January 96 version requires that the 
  33. "throw" statement have access to the copy constructor and destructor of a 
  34. thrown object.
  35.  
  36.                                     David
  37. ---
  38. [ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
  39.                 newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  40.   comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  41.   Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  42.   Comments? mailto:std-c++-request@ncar.ucar.edu 
  43. ]
  44.